<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<form action="login.html" method="post" enctype="application/x-www-form-urlencoded" >
			<input type="text" name="username" placeholder="请输入用户名" /><br />
			<input type="password" name="password" placeholder="请输入密码" /><br /><br />
			<input type="submit" value="登录"/>
		</form>
		<script>
			$('form').submit(function(ev){
				ev.preventDefault();
				console.log('已阻止')
				//获取表单数据,自动转化为字符串序列化对
				var data = $(this).serialize();
				$.get('index.html',data,function(resData){
					
				})
			})
		</script>
	</body>
</html>
